package com.baizhi.springcloud.controller;

import com.baizhi.springcloud.entity.User;
import com.baizhi.springcloud.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/{id}")
    public User selectById(@PathVariable("id") Integer id) {
        /*这是注解*/
        //龙哥威武
        return userService.selectById(id);

        //sdfsdsdfsdff
    }
}
